fix: 过期时间固定365

FFIB 4 年之前
父节点
当前提交
a13e1f5e38
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      commands/management/commands/cpon.py

+ 1 - 1
commands/management/commands/cpon.py

@@ -65,7 +65,7 @@ class Command(CompatibilityBaseCommand):
65 65
                     coupon_image=coupon.coupon_image,
66 66
                     coupon_from='INTEGRAL_MALL',
67 67
                     active_at=tc.utc_datetime(),
68
-                    expire_at=tc.utc_datetime(days=365),
68
+                    expire_at= tc.utc_datetime(days=coupon.coupon_valid_period) if coupon.coupon_expire_type == CouponInfo.CHANGED_EXPIRED_TIME else coupon.coupon_expire_at,
69 69
                     coupon_valid_period=coupon.coupon_valid_period,
70 70
                     coupon_limit_model_ids=coupon.coupon_limit_model_ids,
71 71
                     is_coupon_admin_writeoff=coupon.is_coupon_admin_writeoff,